import express from 'express';
import { WeightController } from '../controllers/WeightController';

const router = express.Router();
const weightController = new WeightController();

// 体重记录相关路由
router.post('/weights', weightController.addWeight);
router.get('/weights', weightController.getWeights);
router.get('/weights/latest', weightController.getLatestWeight);
router.put('/weights/:id', weightController.updateWeight);
router.delete('/weights/:id', weightController.deleteWeight);

// K线数据路由
router.get('/kline', weightController.getKLineData);

// 分时图数据路由
router.get('/timeshare', weightController.getTimeshareData);

// 指标数据路由
router.get('/indicators', weightController.getIndicators);

// 数据管理路由
router.delete('/weights/clear', weightController.clearAllData);
router.post('/mock-data', weightController.generateMockData);

export default router;
